\(\int (d+e x^2) (a+b \arctan (c x)) \, dx\) [1117]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 16, antiderivative size = 68 \[ \int \left (d+e x^2\right ) (a+b \arctan (c x)) \, dx=-\frac {b e x^2}{6 c}+d x (a+b \arctan (c x))+\frac {1}{3} e x^3 (a+b \arctan (c x))-\frac {b \left (3 c^2 d-e\right ) \log \left (1+c^2 x^2\right )}{6 c^3} \]

[Out]

-1/6*b*e*x^2/c+d*x*(a+b*arctan(c*x))+1/3*e*x^3*(a+b*arctan(c*x))-1/6*b*(3*c^2*d-e)*ln(c^2*x^2+1)/c^3

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {5032, 1607, 455, 45} \[ \int \left (d+e x^2\right ) (a+b \arctan (c x)) \, dx=d x (a+b \arctan (c x))+\frac {1}{3} e x^3 (a+b \arctan (c x))-\frac {b \left (3 c^2 d-e\right ) \log \left (c^2 x^2+1\right )}{6 c^3}-\frac {b e x^2}{6 c} \]

[In]

Int[(d + e*x^2)*(a + b*ArcTan[c*x]),x]

[Out]

-1/6*(b*e*x^2)/c + d*x*(a + b*ArcTan[c*x]) + (e*x^3*(a + b*ArcTan[c*x]))/3 - (b*(3*c^2*d - e)*Log[1 + c^2*x^2]
)/(6*c^3)

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 455

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] && NeQ[b*c - a*d, 0] && EqQ[m
- n + 1, 0]

Rule 1607

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 5032

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((d_.) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> With[{u = IntHide[(d + e*x^2
)^q, x]}, Dist[a + b*ArcTan[c*x], u, x] - Dist[b*c, Int[u/(1 + c^2*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x]
&& (IntegerQ[q] || ILtQ[q + 1/2, 0])

Rubi steps \begin{align*} \text {integral}& = d x (a+b \arctan (c x))+\frac {1}{3} e x^3 (a+b \arctan (c x))-(b c) \int \frac {d x+\frac {e x^3}{3}}{1+c^2 x^2} \, dx \\ & = d x (a+b \arctan (c x))+\frac {1}{3} e x^3 (a+b \arctan (c x))-(b c) \int \frac {x \left (d+\frac {e x^2}{3}\right )}{1+c^2 x^2} \, dx \\ & = d x (a+b \arctan (c x))+\frac {1}{3} e x^3 (a+b \arctan (c x))-\frac {1}{2} (b c) \text {Subst}\left (\int \frac {d+\frac {e x}{3}}{1+c^2 x} \, dx,x,x^2\right ) \\ & = d x (a+b \arctan (c x))+\frac {1}{3} e x^3 (a+b \arctan (c x))-\frac {1}{2} (b c) \text {Subst}\left (\int \left (\frac {e}{3 c^2}+\frac {3 c^2 d-e}{3 c^2 \left (1+c^2 x\right )}\right ) \, dx,x,x^2\right ) \\ & = -\frac {b e x^2}{6 c}+d x (a+b \arctan (c x))+\frac {1}{3} e x^3 (a+b \arctan (c x))-\frac {b \left (3 c^2 d-e\right ) \log \left (1+c^2 x^2\right )}{6 c^3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.25 \[ \int \left (d+e x^2\right ) (a+b \arctan (c x)) \, dx=a d x-\frac {b e x^2}{6 c}+\frac {1}{3} a e x^3+b d x \arctan (c x)+\frac {1}{3} b e x^3 \arctan (c x)-\frac {b d \log \left (1+c^2 x^2\right )}{2 c}+\frac {b e \log \left (1+c^2 x^2\right )}{6 c^3} \]

[In]

Integrate[(d + e*x^2)*(a + b*ArcTan[c*x]),x]

[Out]

a*d*x - (b*e*x^2)/(6*c) + (a*e*x^3)/3 + b*d*x*ArcTan[c*x] + (b*e*x^3*ArcTan[c*x])/3 - (b*d*Log[1 + c^2*x^2])/(
2*c) + (b*e*Log[1 + c^2*x^2])/(6*c^3)

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.12

method result size
parts \(a \left (\frac {1}{3} e \,x^{3}+x d \right )+\frac {b \left (\frac {c \arctan \left (c x \right ) x^{3} e}{3}+\arctan \left (c x \right ) c x d -\frac {\frac {e \,c^{2} x^{2}}{2}+\frac {\left (3 c^{2} d -e \right ) \ln \left (c^{2} x^{2}+1\right )}{2}}{3 c^{2}}\right )}{c}\) \(76\)
derivativedivides \(\frac {\frac {a \left (c^{3} x d +\frac {1}{3} e \,c^{3} x^{3}\right )}{c^{2}}+\frac {b \left (\arctan \left (c x \right ) c^{3} x d +\frac {\arctan \left (c x \right ) e \,c^{3} x^{3}}{3}-\frac {e \,c^{2} x^{2}}{6}-\frac {\left (3 c^{2} d -e \right ) \ln \left (c^{2} x^{2}+1\right )}{6}\right )}{c^{2}}}{c}\) \(87\)
default \(\frac {\frac {a \left (c^{3} x d +\frac {1}{3} e \,c^{3} x^{3}\right )}{c^{2}}+\frac {b \left (\arctan \left (c x \right ) c^{3} x d +\frac {\arctan \left (c x \right ) e \,c^{3} x^{3}}{3}-\frac {e \,c^{2} x^{2}}{6}-\frac {\left (3 c^{2} d -e \right ) \ln \left (c^{2} x^{2}+1\right )}{6}\right )}{c^{2}}}{c}\) \(87\)
parallelrisch \(-\frac {-2 x^{3} \arctan \left (c x \right ) b \,c^{3} e -2 a \,c^{3} e \,x^{3}-6 x \arctan \left (c x \right ) b \,c^{3} d +b \,c^{2} e \,x^{2}-6 a \,c^{3} d x +3 \ln \left (c^{2} x^{2}+1\right ) b \,c^{2} d -\ln \left (c^{2} x^{2}+1\right ) b e}{6 c^{3}}\) \(91\)
risch \(-\frac {i b \left (e \,x^{3}+3 x d \right ) \ln \left (i c x +1\right )}{6}+\frac {i b e \,x^{3} \ln \left (-i c x +1\right )}{6}+\frac {i b d x \ln \left (-i c x +1\right )}{2}+\frac {a e \,x^{3}}{3}+a d x -\frac {b e \,x^{2}}{6 c}-\frac {\ln \left (-c^{2} x^{2}-1\right ) b d}{2 c}+\frac {\ln \left (-c^{2} x^{2}-1\right ) b e}{6 c^{3}}\) \(111\)

[In]

int((e*x^2+d)*(a+b*arctan(c*x)),x,method=_RETURNVERBOSE)

[Out]

a*(1/3*e*x^3+x*d)+b/c*(1/3*c*arctan(c*x)*x^3*e+arctan(c*x)*c*x*d-1/3/c^2*(1/2*e*c^2*x^2+1/2*(3*c^2*d-e)*ln(c^2
*x^2+1)))

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.21 \[ \int \left (d+e x^2\right ) (a+b \arctan (c x)) \, dx=\frac {2 \, a c^{3} e x^{3} + 6 \, a c^{3} d x - b c^{2} e x^{2} + 2 \, {\left (b c^{3} e x^{3} + 3 \, b c^{3} d x\right )} \arctan \left (c x\right ) - {\left (3 \, b c^{2} d - b e\right )} \log \left (c^{2} x^{2} + 1\right )}{6 \, c^{3}} \]

[In]

integrate((e*x^2+d)*(a+b*arctan(c*x)),x, algorithm="fricas")

[Out]

1/6*(2*a*c^3*e*x^3 + 6*a*c^3*d*x - b*c^2*e*x^2 + 2*(b*c^3*e*x^3 + 3*b*c^3*d*x)*arctan(c*x) - (3*b*c^2*d - b*e)
*log(c^2*x^2 + 1))/c^3

Sympy [A] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.38 \[ \int \left (d+e x^2\right ) (a+b \arctan (c x)) \, dx=\begin {cases} a d x + \frac {a e x^{3}}{3} + b d x \operatorname {atan}{\left (c x \right )} + \frac {b e x^{3} \operatorname {atan}{\left (c x \right )}}{3} - \frac {b d \log {\left (x^{2} + \frac {1}{c^{2}} \right )}}{2 c} - \frac {b e x^{2}}{6 c} + \frac {b e \log {\left (x^{2} + \frac {1}{c^{2}} \right )}}{6 c^{3}} & \text {for}\: c \neq 0 \\a \left (d x + \frac {e x^{3}}{3}\right ) & \text {otherwise} \end {cases} \]

[In]

integrate((e*x**2+d)*(a+b*atan(c*x)),x)

[Out]

Piecewise((a*d*x + a*e*x**3/3 + b*d*x*atan(c*x) + b*e*x**3*atan(c*x)/3 - b*d*log(x**2 + c**(-2))/(2*c) - b*e*x
**2/(6*c) + b*e*log(x**2 + c**(-2))/(6*c**3), Ne(c, 0)), (a*(d*x + e*x**3/3), True))

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.18 \[ \int \left (d+e x^2\right ) (a+b \arctan (c x)) \, dx=\frac {1}{3} \, a e x^{3} + \frac {1}{6} \, {\left (2 \, x^{3} \arctan \left (c x\right ) - c {\left (\frac {x^{2}}{c^{2}} - \frac {\log \left (c^{2} x^{2} + 1\right )}{c^{4}}\right )}\right )} b e + a d x + \frac {{\left (2 \, c x \arctan \left (c x\right ) - \log \left (c^{2} x^{2} + 1\right )\right )} b d}{2 \, c} \]

[In]

integrate((e*x^2+d)*(a+b*arctan(c*x)),x, algorithm="maxima")

[Out]

1/3*a*e*x^3 + 1/6*(2*x^3*arctan(c*x) - c*(x^2/c^2 - log(c^2*x^2 + 1)/c^4))*b*e + a*d*x + 1/2*(2*c*x*arctan(c*x
) - log(c^2*x^2 + 1))*b*d/c

Giac [F]

\[ \int \left (d+e x^2\right ) (a+b \arctan (c x)) \, dx=\int { {\left (e x^{2} + d\right )} {\left (b \arctan \left (c x\right ) + a\right )} \,d x } \]

[In]

integrate((e*x^2+d)*(a+b*arctan(c*x)),x, algorithm="giac")

[Out]

sage0*x

Mupad [B] (verification not implemented)

Time = 0.61 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.10 \[ \int \left (d+e x^2\right ) (a+b \arctan (c x)) \, dx=a\,d\,x+\frac {a\,e\,x^3}{3}+b\,d\,x\,\mathrm {atan}\left (c\,x\right )+\frac {b\,e\,x^3\,\mathrm {atan}\left (c\,x\right )}{3}-\frac {b\,d\,\ln \left (c^2\,x^2+1\right )}{2\,c}+\frac {b\,e\,\ln \left (c^2\,x^2+1\right )}{6\,c^3}-\frac {b\,e\,x^2}{6\,c} \]

[In]

int((a + b*atan(c*x))*(d + e*x^2),x)

[Out]

a*d*x + (a*e*x^3)/3 + b*d*x*atan(c*x) + (b*e*x^3*atan(c*x))/3 - (b*d*log(c^2*x^2 + 1))/(2*c) + (b*e*log(c^2*x^
2 + 1))/(6*c^3) - (b*e*x^2)/(6*c)